﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;

namespace myMvcBlog.Areas.Admin.Controllers
{
    public class CategoryController : AdminBaseController
    {

        public ActionResult List()
        {
            var categories = Category.All().ToList();
            return View(categories);
        }

        public ActionResult Edit(long id)
        {
            Category cat = Category.SingleOrDefault(category => category.ID == id);
            return View(cat);
        }

    }
}
